package com.icedevcloud.upms.controller.admin.role.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 添加角色ReqDTO
 * </p>
 *
 * @author dengbing
 * @since 2023-08-13
 */
@Schema(name = "添加角色ReqDTO")
@Data
public class AddRoleReqDto {

    @Size(min = 2, max = 20, message = "角色名长度为2-20个字符")
    @NotBlank(message = "角色名不能为空")
    @Schema(description = "角色名")
    private String roleName;

    @NotNull(message = "排序号不能为空")
    @Schema(description = "排序号")
    private Integer sort;

    @Size(min = 2, max = 20, message = "角色编码长度为2-20个字符")
    @NotBlank(message = "角色编码不能为空")
    @Schema(description = "角色编码")
    private String roleCode;

    @Max(value = 1, message = "状态只能为 (1-正常 0-禁用)")
    @Min(value = 0, message = "状态只能为 (1-正常 0-禁用)")
    @NotNull(message = "状态不能为空")
    @Schema(description = "状态")
    private Integer status;

    @Size(max = 255, message = "备注长度不能超过255")
    @Schema(description = "备注")
    private String remark;

    @Schema(description = "权限ID集合")
    private List<Long> permissionIds;

}
